﻿<Window x:Class="UniFlashCompanion.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="UniFlash Companion" Height="411.442" Width="696.02" MinHeight="300" MinWidth="500">
    <Grid x:Name="grdControls">
        <DataGrid x:Name ="dtgFiles" CanUserAddRows="False" AutoGenerateColumns="False" AllowDrop="True" Margin="10,103,10,50" Drop="dtgFiles_Drop" HorizontalGridLinesBrush="#FFADADAD" VerticalGridLinesBrush="#FFDBDBDB">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="Include">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}" Click="CheckBox_Changed" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>

                <!--<DataGridCheckBoxColumn Header="Include" Binding="{Binding IsChecked}" Width="50">
                    
                </DataGridCheckBoxColumn>-->
                <DataGridTextColumn Header="File" IsReadOnly="True" Binding="{Binding Info.Name}" Width="*" />
                <DataGridTextColumn Header="Size (bytes)" IsReadOnly="True" Binding="{Binding Info.Length}" Width="90" />
                <DataGridTextColumn Header="Path on Flash" IsReadOnly="True" Binding="{Binding FlashPath}" Width="*" />

            </DataGrid.Columns>
        </DataGrid>
        <TextBox x:Name="txtFlashRoot" Height="21" Margin="102,10,276,0" TextWrapping="Wrap" Text="www" VerticalAlignment="Top"/>
        <Button x:Name="btnGenerate" Content="Generate" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="btnGenerate_Click"/>
        <Label Content="Root on flash: " HorizontalAlignment="Left" Margin="10,9,0,0" VerticalAlignment="Top"/>
        <TextBox x:Name="txtLocalRoot" Height="21" Margin="102,35,276,0" TextWrapping="Wrap" Text="Drag and drop your folder here" VerticalAlignment="Top" AllowDrop="True" Drop="txtLocalRoot_Drop" PreviewDragOver="txtLocalRoot_PreviewDragOver"/>
        <Label Content="Local Root: " HorizontalAlignment="Left" Margin="10,34,0,0" VerticalAlignment="Top"/>
        <Button x:Name="btnBrowse" Content="Browse..." Margin="0,35,184,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="75" Click="btnBrowse_Click" Visibility="Hidden"/>
        <TextBox x:Name="txtComPort" HorizontalAlignment="Left" Height="21" Margin="102,61,0,0" TextWrapping="Wrap" Text="8" VerticalAlignment="Top" Width="35"/>
        <Label Content="COM Port" HorizontalAlignment="Left" Margin="10,60,0,0" VerticalAlignment="Top"/>
        <Button x:Name="btnFill" Content="Fill from Local Root" HorizontalAlignment="Right" Margin="0,34,50.333,0" VerticalAlignment="Top" Width="120" Click="btnFill_Click"/>
        <Label x:Name="lblSelectionSize" Content="Total Selection Size: 0 bytes" HorizontalAlignment="Right" Margin="0,82,10.333,0" VerticalAlignment="Top" Width="187"/>

    </Grid>
</Window>
